Skip to content

chore: sync test → main (quality gate, branching strategy, docs)#5

Merged
spazyCZ merged 6 commits intomainfrom
test
Mar 9, 2026
Merged

chore: sync test → main (quality gate, branching strategy, docs)#5
spazyCZ merged 6 commits intomainfrom
test

Conversation

@spazyCZ
Copy link
Copy Markdown
Owner

@spazyCZ spazyCZ commented Mar 9, 2026

Summary

Brings main up to date with all changes merged into test:

  • ci: add Claude agentic quality gate and project context — CLAUDE.md, codecov.yml, claude-quality-gate.yml
  • ci: publish to TestPyPI on test branch push instead of main
  • chore: sync main → test (publish-pypi + docs)

After this merges, test and main will be fully aligned and the feature → test → main workflow is operational.

🤖 Generated with Claude Code

spazyCZ and others added 6 commits March 9, 2026 13:32
- Add CLAUDE.md with project context for all Claude agents
- Add codecov.yml to suppress spurious uploader warnings
- Add claude-quality-gate.yml with three parallel agents:
  test coverage, docs/changelog enforcement, code review

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Aligns with feature → test → main branching strategy:
test branch is now the staging gate before production.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ci: add Claude agentic quality gate and project context
ci: align publish-testpypi trigger with branching strategy
chore: sync main → test (publish-pypi + docs)
Copilot AI review requested due to automatic review settings March 9, 2026 12:53
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Syncs main with changes previously merged into test to support the repo’s branch workflow and CI quality gates.

Changes:

  • Add Codecov configuration to aggregate coverage across the 4-version Python matrix.
  • Add CLAUDE.md project context for Claude-based automation.
  • Update CI automation: introduce a Claude “quality gate” workflow and shift TestPyPI publishing to run on test branch pushes.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
codecov.yml Adds Codecov status/notification config aligned with the 4-job CI matrix.
CLAUDE.md Adds project conventions/context documentation for Claude Code usage.
.github/workflows/publish-testpypi.yml Changes publish trigger from main pushes to test pushes.
.github/workflows/claude-quality-gate.yml Adds a multi-agent Claude workflow intended to check tests, docs/changelog, and code quality on PRs to main.

Comment on lines +9 to +18
| File | Purpose |
|------|---------|
| `ptop3/monitor.py` | Core TUI + data aggregation |
| `ptop3/sudo_config.py` | Passwordless sudo setup |
| `ptop3/scripts/drop_caches.py` | Kernel cache clearing |
| `ptop3/scripts/swap_clean.py` | Swap cleanup |
| `tests/` | Pytest suite — all 4 Python versions |
| `CHANGELOG.md` | User-facing change log |
| `.github/instructions/code-review.instructions.md` | Full style & quality guide |

Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The markdown table under "Key Files" uses double pipes (||) at the start of each row, which breaks standard GitHub-flavored markdown table rendering. Use a single leading pipe (|) per row (and keep the header separator row aligned) so the table renders correctly.

Copilot uses AI. Check for mistakes.
Comment on lines +8 to +12
permissions:
contents: read
pull-requests: write
issues: write
id-token: write
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow instructs the Claude agents to commit changes back to the PR branch, but the workflow-level permissions only grant contents: read. With contents: read, the GITHUB_TOKEN cannot push commits, so these steps will fail when the agent tries to apply fixes/tests/docs. Either remove/adjust the "create a commit" instructions so the agents only comment, or switch to a safe mechanism that can write (e.g., contents: write only for trusted/internal branches, or a separate workflow designed for auto-fix).

Copilot uses AI. Check for mistakes.
Comment on lines +36 to +40
- Patch os.geteuid for root-required paths
- Tests must pass on Python 3.10–3.13
4. If all functions are covered, post a short confirmation comment.
5. If you added tests, create a commit on this PR branch with message "test: add missing tests for <summary>"

Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This prompt asks the agent to "create a commit on this PR branch", but the workflow’s token permissions are contents: read (and on fork PRs, secrets won’t be available). As written, the agent won’t be able to push commits; please change this to comment-only behavior or adjust the workflow design/permissions accordingly.

Copilot uses AI. Check for mistakes.
Comment on lines +104 to +108
For each issue found:
- Post an inline PR review comment at the exact file+line.
- If the fix is straightforward (style, missing guard), apply it directly and commit
with message "fix: <short description>".
- If the fix requires design decisions, comment only — do not auto-fix.
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This prompt instructs the agent to auto-fix issues and commit them ("apply it directly and commit"), but the workflow does not grant contents: write, so any attempted auto-fix commit/push will fail. Either remove the auto-commit direction here, or update the workflow design to support safe write access (ideally avoiding write permissions on pull_request events for untrusted code).

Copilot uses AI. Check for mistakes.
Comment on lines +64 to +76
- If missing, add the appropriate entry under the correct section
(Added / Changed / Fixed / Security / Deprecated / Removed).
- Do NOT bump version numbers.

2. README check:
- If new keybindings, CLI flags, or entry points were added, verify README.md documents them.
- If missing, add the documentation.

3. Docstring check:
- For any new public function in ptop3/ that lacks a docstring, add a one-line docstring.

If you made changes, commit them with message "docs: update changelog/readme for <summary>".
If everything is already documented, post a short confirmation comment.
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This prompt says to commit documentation/CHANGELOG fixes back to the PR branch, but the workflow permissions are contents: read, so the agent cannot push commits. Please change this instruction to comment-only (or redesign the workflow/permissions for safe write access).

Suggested change
- If missing, add the appropriate entry under the correct section
(Added / Changed / Fixed / Security / Deprecated / Removed).
- Do NOT bump version numbers.
2. README check:
- If new keybindings, CLI flags, or entry points were added, verify README.md documents them.
- If missing, add the documentation.
3. Docstring check:
- For any new public function in ptop3/ that lacks a docstring, add a one-line docstring.
If you made changes, commit them with message "docs: update changelog/readme for <summary>".
If everything is already documented, post a short confirmation comment.
- If a required entry is missing, do not modify files or commit.
Instead, post a PR comment that:
- States that a CHANGELOG entry is missing.
- Specifies the appropriate section (Added / Changed / Fixed / Security / Deprecated / Removed).
- Proposes the exact text to add under that section.
- Do NOT bump version numbers.
2. README check:
- If new keybindings, CLI flags, or entry points were added, verify README.md documents them.
- If required documentation is missing, do not modify files or commit.
Instead, post a PR comment that:
- Explains what is missing.
- Proposes concrete wording or a patch snippet to add to README.md.
3. Docstring check:
- For any new public function in ptop3/ that lacks a docstring, do not modify files or commit.
Instead, post a PR comment that:
- Identifies the function (module, name, and signature).
- Proposes a one-line docstring for the author to add.
You must not write to the repository or create commits in this job.
If changes are needed, communicate them only via PR comments with concrete suggestions.
If everything is already documented, post a short confirmation comment summarizing what you checked.

Copilot uses AI. Check for mistakes.
@spazyCZ spazyCZ merged commit 2f407f4 into main Mar 9, 2026
28 checks passed
spazyCZ added a commit that referenced this pull request Mar 9, 2026
- Remove auto-commit instructions from all three agents — contents: read
  prevents pushing commits on pull_request events
- Agents now post PR comments with proposed fixes/snippets instead
- Add test branch to workflow trigger (feature PRs target test, not main)

Fixes Copilot review comments on PR #5.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@spazyCZ
Copy link
Copy Markdown
Owner Author

spazyCZ commented Mar 9, 2026

@copilot make new review

spazyCZ added a commit that referenced this pull request Mar 9, 2026
* fix: harden monitor behavior and raise coverage

* fix: quality gate agents comment-only, add test branch trigger

- Remove auto-commit instructions from all three agents — contents: read
  prevents pushing commits on pull_request events
- Agents now post PR comments with proposed fixes/snippets instead
- Add test branch to workflow trigger (feature PRs target test, not main)

Fixes Copilot review comments on PR #5.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: address PR review feedback

* fix: simplify claude code review workflow

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
spazyCZ added a commit that referenced this pull request Mar 10, 2026
* fix: harden monitor behavior and raise coverage

* fix: quality gate agents comment-only, add test branch trigger

- Remove auto-commit instructions from all three agents — contents: read
  prevents pushing commits on pull_request events
- Agents now post PR comments with proposed fixes/snippets instead
- Add test branch to workflow trigger (feature PRs target test, not main)

Fixes Copilot review comments on PR #5.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: address PR review feedback

* fix: simplify claude code review workflow

* ci: auto-version testpypi publishes

* ci: set testpypi environment

* chore: ignore coverage artifacts

* chore: use standard python gitignore

* test: tighten swap fallback assertion

* fix: pass github_token to claude-code-action to resolve permission denials

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
spazyCZ added a commit that referenced this pull request Mar 10, 2026
* fix: simplify quality gate workflow and harden monitor coverage (#7)

* fix: harden monitor behavior and raise coverage

* fix: quality gate agents comment-only, add test branch trigger

- Remove auto-commit instructions from all three agents — contents: read
  prevents pushing commits on pull_request events
- Agents now post PR comments with proposed fixes/snippets instead
- Add test branch to workflow trigger (feature PRs target test, not main)

Fixes Copilot review comments on PR #5.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: address PR review feedback

* fix: simplify claude code review workflow

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: simplify Claude workflows and TestPyPI publishing (#8)

* fix: harden monitor behavior and raise coverage

* fix: quality gate agents comment-only, add test branch trigger

- Remove auto-commit instructions from all three agents — contents: read
  prevents pushing commits on pull_request events
- Agents now post PR comments with proposed fixes/snippets instead
- Add test branch to workflow trigger (feature PRs target test, not main)

Fixes Copilot review comments on PR #5.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: address PR review feedback

* fix: simplify claude code review workflow

* ci: auto-version testpypi publishes

* ci: set testpypi environment

* chore: ignore coverage artifacts

* chore: use standard python gitignore

* test: tighten swap fallback assertion

* fix: pass github_token to claude-code-action to resolve permission denials

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants